<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Article extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('article', function (Blueprint $table) {
            $table->increments('article_id');
            $table->mediumInteger('ac_id')->unsigned()->default(0)->comment('分类id');
            $table->string('article_url',100)->comment('跳转链接');
            $table->tinyInteger('article_show')->unsigned()->default(1)->comment('是否显示，0为否，1为是，默认为1');
            $table->tinyInteger('article_position')->default(1)->comment('显示位置:1默认网站前台,2买家,3卖家,4全站');
            $table->tinyInteger('article_sort')->unsigned()->default(255)->comment('排序');
            $table->string('article_title')->comment('标题');
            $table->text('article_content')->comment('内容');
            $table->integer('article_time')->unsigned()->default()->comment('发布时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('article');
    }
}
